﻿using System;
using System.Collections.Generic;
using System.Web.Script.Serialization;
using WeiXinSDK.DataModel.Enum;

namespace WeiXinSDK.DataModel
{
    public class AsyncMessage
    {
        private string _touser = "";

        public string touser
        {
            get { return _touser; }
            set { _touser = value; }
        }

        /// <summary>
        /// 设置响应消息的类型
        /// </summary>
        [ScriptIgnore]
        public PassiveMessageType PassiveMessageType
        {
            set
            {
                this.msgtype = value.ToString().ToLower();
            }
        }


        private string _msgtype = "";

        public string msgtype
        {
            get { return _msgtype; }
            set { _msgtype = value; }
        }

        private text _text = new text();

        public text text
        {
            get { return _text; }
            set { _text = value; }
        }


        private news _news = new news();

        public news news
        {
            get { return _news; }
            set { _news = value; }
        }
    }


    public class text
    {
        private string _content = "";

        public string content
        {
            get { return _content; }
            set { _content = value; }
        }
    }

    public class news
    {

        private List<articles> _articles = new List<articles>();

        public List<articles> articles
        {
            get { return _articles; }
            set { _articles = value; }
        }
    }

    public class articles
    {
        private string _title = "";

        public string title
        {
            get { return _title; }
            set { _title = value; }
        }

        private string _description = "";

        public string description
        {
            get { return _description; }
            set { _description = value; }
        }

        private string _url = "";

        public string url
        {
            get { return _url; }
            set { _url = value; }
        }

        private string _picurl = "";

        public string picurl
        {
            get { return _picurl; }
            set { _picurl = value; }
        }
    }
}
